package com.ambow.shop.service.impl;

import java.sql.SQLException;

import com.ambow.shop.dao.UserDAO;
import com.ambow.shop.dao.impl.UserDaoJdbcImpl;
import com.ambow.shop.domain.User;
import com.ambow.shop.service.UserService;

/**
 * 用户服务实现类。
 * 
 * @author chunw
 *
 */
public class UserServiceImpl implements UserService {
	private UserDAO userDao = new UserDaoJdbcImpl();

	@Override
	public User login(String name, String password) {
		try {
			return userDao.get(name, password);
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}

	}

}
